#!/usr/bin/python

import sys

f = open(sys.argv[1], "rU")

lines = f.readlines()

phyla_list = []

for i in lines:
    sl = i.split('\t')
    phyla_list.append(sl[1].rstrip())

uniq_names = set(phyla_list)

uniq_counts = {}

for i, j in enumerate(uniq_names):
    counts = phyla_list.count(j) 
    print j, "\t", counts
